<template>
  <el-card>
    <CategorySelect />
    <SpuList v-if="isShowList === 1" @showSpuList="shiftShowList" />
    <AddSpu v-else-if="isShowList === 2" @showSpuList="shiftShowList" />
  </el-card>
</template>

<script>
import CategorySelect from '@/components/CategorySelect/index'
import SpuList from './components/SpuList'
import AddSpu from './components/AddSpu'
export default {
  name: 'Spu',
  components: {
    CategorySelect,
    SpuList,
    AddSpu
  },
  data() {
    return {
      isShowList: 1
    }
  },
  methods: {
    shiftShowList(val) {
      this.isShowList = val
    }
  }
}
</script>

<style lang="less" scoped>
</style>
